com.rscja.team.qcom.usb

## Class UsbBase_qcom

- java.lang.Object
- - com.rscja.team.qcom.usb.UsbBase_qcom

- Direct Known Subclasses:
    RxUsb_qcom, UrxUsb_qcom, UsbPL2302

      public abstract class UsbBase_qcom
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `UsbBase_qcom.DataCallback`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `UsbBase_qcom.DataCallback` | `dataCallback`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UsbBase_qcom()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract android.hardware.usb.UsbDevice` | `closeport()`
    `ConnectionStatus` | `getConnectionStatus()`
    `java.util.List<android.hardware.usb.UsbDevice>` | `getDeviceList(android.content.Context context)` 获取 USB 设备列表
    `android.hardware.usb.UsbDevice` | `getUsbDevice(android.content.Context context, int vendorId, int productId)`
    `abstract android.hardware.usb.UsbDeviceConnection` | `getUsbDeviceConnection()`
    `abstract void` | `init(android.content.Context context)`
    `abstract int` | `openPort(android.hardware.usb.UsbDevice device)`
    `abstract int` | `sendData(byte[] bytes)`
    `void` | `setConnectionStatusCallback(ConnectionStatusCallback callback)`
    `void` | `setDataCallback(UsbBase_qcom.DataCallback dataCallback)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### dataCallback

          public UsbBase_qcom.DataCallback dataCallback

  - ### Constructor Detail

    - #### UsbBase_qcom

          public UsbBase_qcom()

  - ### Method Detail

    - #### getDeviceList

          public java.util.List<android.hardware.usb.UsbDevice> getDeviceList(android.content.Context context)

      获取 USB 设备列表

    - #### getUsbDevice

          public android.hardware.usb.UsbDevice getUsbDevice(android.content.Context context,
                                                             int vendorId,
                                                             int productId)

      Parameters:
        `vendorId` - 厂商ID
        `productId` - 产品ID
      Returns:
        device

    - #### init

          public abstract void init(android.content.Context context)

    - #### openPort

          public abstract int openPort(android.hardware.usb.UsbDevice device)

    - #### closeport

          public abstract android.hardware.usb.UsbDevice closeport()

    - #### sendData

          public abstract int sendData(byte[] bytes)

    - #### getUsbDeviceConnection

          public abstract android.hardware.usb.UsbDeviceConnection getUsbDeviceConnection()

    - #### setConnectionStatusCallback

          public void setConnectionStatusCallback(ConnectionStatusCallback callback)

    - #### getConnectionStatus

          public ConnectionStatus getConnectionStatus()

    - #### setDataCallback

          public void setDataCallback(UsbBase_qcom.DataCallback dataCallback)